<?php
// vim: set ts=4 sw=4 sts=4 et ft=php:

/**
 * @file
 * Installation routines
 *
 * @category  Litecommerce connector
 * @package   Litecommerce connector
 * @author    Creative Development LLC <info@cdev.ru>
 * @copyright Copyright (c) 2011 Creative Development LLC <info@cdev.ru>. All rights reserved
 * @license   http://www.gnu.org/licenses/gpl-2.0.html GNU General Public License, version 2
 * @link      http://www.litecommerce.com/
 * @since     1.0.0
 */

/**
 * Module tables schema
 *
 * @hook   schema
 * @return void
 * @since  1.0.0
 */
function lc_connector_schema() {
    return LCConnector_Install::getSchema();
}

/**
 * Install module
 *
 * @hook   install
 * @return void
 * @since  1.0.0
 */
function lc_connector_install() {
    LCConnector_Install::performInstall();
}

/**
 * Uninstall module
 *
 * @hook   uninstall
 * @return void
 * @since  1.0.0
 */
function lc_connector_uninstall() {
    LCConnector_Install::performUninstall();
}

/**
 * Implementation hook_requirements()
 *
 * @param string $phase Installation type
 *
 * @hook   requirements
 * @return array
 * @since  1.0.0
 */
function lc_connector_requirements($phase) {
    return LCConnector_Install::checkRequirements($phase);
}

// Include some scripts if not loaded yet
if (!class_exists('LCConnector_Install')) {
    $current_dir = dirname(__FILE__);
    require_once $current_dir . '/classes/Abstract.php';
    require_once $current_dir . '/classes/Install.php';
}
